<?php
	if ($this->flag == 0) {
		$form	= $this->form;
		$form->prepare();
		$form->setAttribute('action', $this->url('index', array('action' => 'contact')));
		$form->get('submit')->setAttribute('class', 'register');

		$labelYourname	= $this->formLabel($form->get('name'));
		$yourname	= $this->formInput($form->get('name'));
		$errorYourname	= $this->formElementErrors($form->get('name'));

		$labelEmail	= $this->formLabel($form->get('email'));
		$email	= $this->formInput($form->get('email'));
		$errorEmail	= $this->formElementErrors($form->get('email'));

		$labelPhone	= $this->formLabel($form->get('phone'));
		$phone	= $this->formInput($form->get('phone'));
		$errorPhone	= $this->formElementErrors($form->get('phone'));

		$labelTitle	= $this->formLabel($form->get('title'));
		$title	= $this->formInput($form->get('title'));
		$errorTitle	= $this->formElementErrors($form->get('title'));

		$labelContent	= $this->formLabel($form->get('content'));
		$content	= $this->formTextarea($form->get('content'));
		$errorContent	= $this->formElementErrors($form->get('content'));

		$submit 	= $this->formInput($form->get('submit'));
		echo $this->form()->openTag($this->form);
?>
		<div class="title"><span class="title_icon"><img src='<?php echo $this->basePath();?>/images/bullet1.png' /></span>Liên hệ</div>
		<div style="font-size: 15px; font-style: italic; margin-left: 35px; color: #734633;">
			<p>Email: exam-contact@gmail.com</p>
			<p>SĐT: 01669806628</p>
		</div>
		<div class="contact_form" style="width: 550px">
			<div class="form_subtitle">Ý kiến của bạn</div>
			<div style="margin-bottom: 10px;">
				<?php echo $labelYourname; ?>
				<div class="text-danger"><?php echo $errorYourname; ?></div>
				<?php echo $yourname; ?>
			</div>
			<div style="margin-bottom: 10px;">
				<?php echo $labelEmail; ?>
				<div class="text-danger"><?php echo $errorEmail; ?></div>
				<?php echo $email; ?>
			</div>
			<div style="margin-bottom: 10px;">
				<?php echo $labelPhone; ?>
				<div class="text-danger"><?php echo $errorPhone; ?></div>
				<?php echo $phone; ?>
			</div>
			<div style="margin-bottom: 10px;">
				<?php echo $labelTitle; ?>
				<div class="text-danger"><?php echo $errorTitle; ?></div>
				<?php echo $title; ?>
			</div>
			<div style="margin-bottom: 10px;">
				<?php echo $labelContent; ?>
				<div class="text-danger"><?php echo $errorContent; ?></div>
				<?php echo $content; ?>
			</div>
			<div style="text-align: center;"><?php echo $submit; ?></div>
		</div>
		<div class="clear"></div>
<?php
		echo $this->form()->openTag($this->form);
	}
	else {
?>
		<p class="text-success" style="font-weight: bold; font-size: 19px; text-align: center; margin-top: 200px; font-style: italic;">
			Cảm ơn ý kiến đóng góp của bạn !
		</p>
<?php
	}
?>